<?php
/**
 * Created by PhpStorm.
 * User: mac
 * Date: 2018/5/17
 * Time: 15:35
 */

namespace app\index\controller;


use think\Controller;

class GetSlides extends Controller
{
    public function get_slider()
    {
        $A = new Api();
        $slides = [
            'banner' => ['id' => config('slides.banner'), 'page_limit' => 4],//首页banner
        ];
        foreach ($slides as $key => $value) {
            $data = $A->get_slides($value['id']);
            $data = getImg($data);
            $slide[$key] = [
                'list' => $data['data']
            ];
        }
        $this->view->assign($slide);
    }
}